<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>H+数据表格</title>
   
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/houtai/favicon.ico"> <link href="${pageContext.request.contextPath}/houtai/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/houtai/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="${pageContext.request.contextPath}/houtai/css/animate.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/houtai/css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                     <form action="${pageContext.request.contextPath}/userlist" method="post">
                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th>员工号</th>
                                    <th>姓名</th>
                                    <th>密码</th>
                                    <th>性别</th>
                                    <th>联系方式</th>
                                    <th>注册时间</th>
									<th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <c:forEach items="${list }" var="user">
                                <tr class="gradeX">
                                  	    
										<td><i class="fa fa-key"></i> ${user.username }</td>
										<td><i class="fa fa-user"></i> ${user.nickname }</td>
										<td><i class="fa fa-eye"></i> ${user.password }</td>
										<td><i class="fa fa-male"></i> ${user.sex }</td>
										<td><i class="fa fa-phone"></i> ${user.phonenumber }</td>
										<td><i class="fa fa-clock-o"></i> ${user.zhucetime }</td>
										<td>
										<a href="javascript:if(confirm('您确定要启用此人物?')){window.location='${pageContext.request.contextPath}/userEnable?id=${user.id}&currentPage=${requestScope.page.currentPage}'}">
									       <i class="fa fa-hand-pointer-o"></i>  启用
										</a>				
										</td> 
                                </tr>
                                </c:forEach>
                            </tbody>
                        </table>
                        </form>
						 <div class="fenye">
							<p>共 ${requestScope.page.totalSize } 条记录</p>
							<div>
								<ul class="btn btn-white">
									${requestScope.pageString }
								</ul>
							</div>
						</div>
                    </div>
                </div>
            </div>
        </div>
          </div>
<input type="hidden" value="${requestScope.page.totalPage }" id="totalPage"/>
    <!-- 全局js -->
    <script src="${pageContext.request.contextPath}/houtai/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/houtai/js/bootstrap.min.js?v=3.3.6"></script>



    <script src="${pageContext.request.contextPath}/houtai/js/plugins/jeditable/jquery.jeditable.js"></script>

   
    <!-- 自定义js -->
    <script src="${pageContext.request.contextPath}/houtai/js/content.js"></script>


     <script type="text/javascript">
		$(document).ready(function(){
			$('.page_s').on('click',function(){
				var count = $(this).attr('lang');
				if (count <= parseInt($('#totalPage').val()) && count >= 1){
		   window.location.href="${pageContext.request.contextPath}/list?currentPage="+count;
			}
			});
			
		});
		function  toStart(){
			 window.location.href="${pageContext.request.contextPath}/list?currentPage="+1;
			}
		function  toEnd(){
			 window.location.href="${pageContext.request.contextPath}/list?currentPage="+parseInt($('#totalPage').val());
			}
	</script>
</body>

</html>
